import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import AdminView from '../views/AdminView.vue'
import UserView from '../views/UserView.vue'
import StudentView from '@/views/StudentView'
import NoticeView from '@/views/NoticeView'
import ConfigView from '@/views/ConfigView'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  // {
  //   path: '/admin',
  //   name: 'admin',
  //   component: () => import('../views/AdminView.vue')
  // },
  {
    path: '/admin',
    name: 'admin',
    component: AdminView
  },
  {
    path: '/user',
    name: 'user',
    component: UserView
  },
  {
    path: '/student',
    name: 'student',
    component: StudentView
  },
  {
    path: '/notice',
    name: 'notice',
    component: NoticeView
  },
  {
    path: '/config',
    name: 'config',
    component: ConfigView
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
